package com.excellent.system.service.impl;

import com.excellent.common.core.text.Convert;
import com.excellent.system.domain.SysWeekNews;
import com.excellent.system.mapper.SysWeekNewsMapper;
import com.excellent.system.service.ISysWeekNewsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 具体周报Service业务层处理
 *
 * @author excellent
 * @date 2022-05-05
 */
@Service
public class SysWeekNewsServiceImpl implements ISysWeekNewsService
{
    @Autowired
    private SysWeekNewsMapper sysWeekNewsMapper;

    /**
     * 查询具体周报
     *
     * @param id 具体周报ID
     * @return 具体周报
     */
    @Override
    public SysWeekNews selectSysWeekNewsById(Integer id)
    {
        return sysWeekNewsMapper.selectSysWeekNewsById(id);
    }

    /**
     * 查询具体周报列表
     *
     * @param sysWeekNews 具体周报
     * @return 具体周报
     */
    @Override
    public List<SysWeekNews> selectSysWeekNewsList(SysWeekNews sysWeekNews)
    {
        return sysWeekNewsMapper.selectSysWeekNewsList(sysWeekNews);
    }

    /**
     * 新增具体周报
     *
     * @param sysWeekNews 具体周报
     * @return 结果
     */
    @Override
    public int insertSysWeekNews(SysWeekNews sysWeekNews)
    {
        return sysWeekNewsMapper.insertSysWeekNews(sysWeekNews);
    }

    /**
     * 修改具体周报
     *
     * @param sysWeekNews 具体周报
     * @return 结果
     */
    @Override
    public int updateSysWeekNews(SysWeekNews sysWeekNews)
    {
        return sysWeekNewsMapper.updateSysWeekNews(sysWeekNews);
    }

    /**
     * 删除具体周报对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSysWeekNewsByIds(String ids)
    {
        return sysWeekNewsMapper.deleteSysWeekNewsByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除具体周报信息
     *
     * @param id 具体周报ID
     * @return 结果
     */
    @Override
    public int deleteSysWeekNewsById(Integer id)
    {
        return sysWeekNewsMapper.deleteSysWeekNewsById(id);
    }
}
